package com.java.CarDemo;

public class Bus extends Car{
    private int setNumber;


    public Bus() {
    }

    public Bus(int carNumber, String brand, String color, double price, float output, int setNumber) {
        super(carNumber, brand, color, price, output);
        this.setNumber = setNumber;
    }

    public int getSetNumber() {
        return setNumber;
    }

    public void setSetNumber(int setNumber) {
        this.setNumber = setNumber;
    }

    @Override
    public float rentPrice() {
        //巴士 一天=1000块 + 座位数 * 50
        return 1000 + setNumber * 50;
    }
}
